/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/memory
// Copyright( c) 2013.  All Rights Reserved
//
// File:		AEObserverI.h
// Author:		Gianluca Belardelli
// Date:		09/04/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AEOBSERVERI_H_
#define _AEOBSERVERI_H_

/// \brief
/// L'interfaccia AEObserverI consente di far comunicare tra loro sistemi 
/// che necessitano di modificare il loro comportamento reagendo ad un cambiamento.
class AEObserverI
{
public:
    virtual ~AEObserverI ( void ) {}

    /// <summary>
    ///   Lets the ISubject notify the IObserver in changes in registered aspects of interest.
    /// </summary>
    /// <remarks> This method is typically called from 	IChangeManager::DistributeQueuedChanges() or 
    ///		ISubject::PostChanges() depending on whether the observer registered with an IChangeManager 
    ///		or an ISubject respectively.	
    ///  </remarks>
    /// <param name="pSubject">  A pointer to the ISubject interface of the component that 
    ///  changed.</param>
    /// <param name="ChangeType"> The aspects of interest that changed as defined by the supplied 
    ///        ISubject's published interest bits.  
    ///        if uInChangeBits are 0, then the subject is shutting down, and should be released. 
    ///	</param>
    /// <returns>One of the following Error codes:
    ///     Error::Success
    ///			No error.
    ///     Error::InvalidAddress 
    ///			pInSubject was NULL.
    ///     Error::OutOfMemory                                   
    ///			Not enough memory is available to resolve the change.
    ///</returns>
    virtual AEUINT32 ChangeOccurred( AESubjectI *lpSubject, AEUINT32 uiChangeTypeMask ) = 0;
};

#endif // _AEOBSERVERI_H_
